<%@page import="com.bbs.dao.TopicDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

    <%
      int topicId=Integer.valueOf(request.getParameter("topicId"));
    int boardId=Integer.valueOf(request.getParameter("boardId"));
      TopicDao topicDao=new TopicDao();
      boolean result= topicDao.deleteTopicIdByTopicId(topicId);
      if(result){
    	  
    	   out.print("<script>alert('删除成功!');location.href='../list.jsp?boardId="+boardId+"'</script>");
      }else{
    	  out.print("<script>alert('删除失败!');location.href='../list.jsp?boardId="+boardId+"&topicId="+topicId+"'</script>");
    	  
      }
    
    %>